Conventionally, there is technology to compensate for interruption of coordinate data outputted from a coordinate input device such as a touch panel. For example, there is conventional technology in which when a touch-off time is shorter than a predetermined time, it is determined that a contact state continues.
However, in the above conventional technology, whether or not a contact state continues is determined by whether or not a touch-off time is shorter than a predetermined time (a fixed time). Thus, an erroneous determination is often made depending on a way in which an input operation is performed by an operator.
It is a feature of the technology disclosed herein to provide a computer-readable storage medium, an information processing apparatus, an information processing system, and an information processing method which can appropriately process input data outputted from a predetermined input device.
The feature described above is attained by, for example, the following configuration examples.
A first configuration example is a computer-readable storage medium having stored therein an information processing program for processing input data outputted from a predetermined input device. The information processing program causes a computer to operate as: an interruption compensation period setter configured to set an interruption compensation period on the basis of a change amount of the input data; and an interruption compensator configured to determine that input continues and correct the input data, during a period from a time when output of the input data from the input device is interrupted to a time when the interruption compensation period elapses.
The “input device” may be any device which outputs input data corresponding to an input operation of the operator, and is a touch panel as an example. The “input device” may be any device which outputs input data corresponding to an input operation of the operator, and is a touch panel as an example. “To determine that input continues and correct the input data” may be to complement input data for a period when the output of the input data from the input device is interrupted, or may be to set information indicating an input state, to an input presence state.
The information processing program can be stored in any computer-readable storage medium (e.g., a flexible disc, a hard disk, an optical disc, a magneto-optical disc, a CD-ROM, a CD-R, a magnetic tape, a semiconductor memory card, a ROM, a RAM, etc.).
The interruption compensation period which is set by the interruption compensation period setter may increase as a change amount of the input data immediately before the output of the input data from the input device is interrupted increases.
Further, the information processing program may further cause the computer to operate as a change speed calculator configured to calculate a change speed of the input data. The interruption compensation period setter may set the interruption compensation period on the basis of the change speed of the input data calculated by the change speed calculator.
The change speed calculator may calculate the change speed of the input data on the basis of at least a difference between latest input data and input data immediately previous to the latest input data.
Further, the predetermined input device may be a coordinate input device, and the input data may be input coordinate data indicating a contact position with respect to an operation surface of the coordinate input device. During a period from a time when the contact position indicated by the input coordinate data is interrupted to a time when the interruption compensation period elapses, the interruption compensator may determine that contact continues, and may correct the input coordinate data.
Further, the information processing program may further cause the computer to operate as a following value calculator configured to calculate a following value which follows a target value which is set on the basis of the input data. When the output of the input data is interrupted, the interruption compensator may complement input data for a period when the output of the input data is interrupted, by using the following value.
The “target value which is set on the basis of the input data” may be an input value or another value (an allowance coordinate described later) updated in accordance with an input value. The “following value” is, for example, a value which is controlled so as to gradually approach the target value even when the target value stops.
Further, the information processing program may further cause the computer to operate as a following coordinate calculator configured to calculate a following coordinate which follows a target coordinate which is set on the basis of the input data. When the contact position indicated by the input coordinate data is interrupted, the interruption compensator may complement a contact position for a period when the contact position indicated by the input coordinate data is interrupted, on the basis of an interval of the contact position indicated by the input coordinate data and a moving direction of the following coordinate.
Further, the following value calculator may calculate the following value such that the following value follows the target value at a predetermined rate.
The “predetermined rate” may be a constant or may be a variable which changes in response to a situation, such as a following rate described later.
Further, the following value calculator may update the following value such that a difference between the following value and the target value decreases at the predetermined rate.
Further, the following value calculator may update the following value such that the following value approaches the target value by a value obtained by multiplying a difference between the following value and the target value by the predetermined rate.
Further, the predetermined input device may be a coordinate input device which outputs input coordinate data indicating a contact position with respect to an operation surface thereof. When output of the input coordinate data from the coordinate input device is interrupted during an input operation of moving the contact position with contact with the operation surface maintained, the interruption compensation period setter may determine that input continues, during a period which increases as a speed of the input operation increases.
Further, the interruption compensator may correct the input data in real time.
A second configuration example is an information processing apparatus for processing input data outputted from a predetermined input device. The information processing apparatus comprises: an interruption compensation period setter configured to set an interruption compensation period on the basis of a change amount of the input data; and an interruption compensator configured to determine that input continues and correct the input data, during a period from a time when output of the input data from the input device is interrupted to a time when the interruption compensation period elapses.
A third configuration example is an information processing system for processing input data outputted from a predetermined input device. The information processing system comprises: an interruption compensation period setter configured to set an interruption compensation period on the basis of a change amount of the input data; and an interruption compensator configured to determine that input continues and correct the input data, during a period from a time when output of the input data from the input device is interrupted to a time when the interruption compensation period elapses.
A fourth configuration example is an information processing method executed by a computer of an information processing system for processing input data outputted from a predetermined input device. The information processing method comprises the steps of: setting an interruption compensation period on the basis of a change amount of the input data; and determining that input continues and correcting the input data, during a period from a time when output of the input data from the input device is interrupted to a time when the interruption compensation period elapses.
According to the technology, it is possible to appropriately process input data outputted from a predetermined input device.
These and other objects, features, aspects and advantages of the technology will become more apparent from the following detailed description of non-limiting example embodiments when taken in conjunction with the accompanying drawings.